home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / ViewIt™ 2.24 Shareware / Pascal Demo Projects / THINK Pascal 4.0 Demos / TutorialLP.pas < prev    next >
Pascal/Delphi Source File  |  1993-07-08  |  2KB  |  54 lines

  1. {Tutorial LP Demonstration Program}
  2. {©FaceWare 1993.  All Rights Reserved.}
  3.  
  4. program TutorialLP;
  5. {$I-}
  6.  
  7.     uses
  8.         FaceStorLP, FaceProcLP;
  9.     var
  10.         theFlag, theListItem, theMenuItem: integer;
  11.         theString: string[31];
  12.  
  13. begin
  14.     fRec.uName := 'Tutorial.Rsrc';
  15.     FaceIt(nil, DoInit, 0, 0, 0, 0);
  16.     theFlag := 0;
  17.     theListItem := 3;
  18.     theMenuItem := 2;
  19.     theString := 'Hello';
  20.     repeat
  21.         FaceIt(nil, DoLoop, 0, 0, 0, 0);
  22.         if (fRec.uMenuID = 105) and (fRec.uMenuItem = 1) then
  23.             begin
  24.                 FaceIt(nil, NewWnd, 1010, 0, 0, 0);
  25.                 FaceIt(nil, GetCtl, 1010, 0, 1, 3);
  26.                 FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theFlag), 2, 0);
  27.                 FaceIt(nil, GetCtl, 1010, 0, 1, 4);
  28.                 FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theString), -31, 0);
  29.                 FaceIt(nil, GetCtl, 1010, 0, 1, 5);
  30.                 FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theListItem), 2, 0);
  31.                 FaceIt(nil, GetCtl, 1010, 0, 1, 6);
  32.                 FaceIt(nil, LnkCtl, ord(fRec.cControl), ord(@theMenuItem), 2, 0);
  33.                 FaceIt(nil, SetVal, 1010, 0, 0, 0);
  34.                 repeat
  35.                     FaceIt(nil, MdlWnd, 1010, 0, 0, 0);
  36.                     if (fRec.uMenuID = 1010) then
  37.                         if (fRec.wcHit = -1) then
  38.                             leave
  39.                         else if (fRec.wcHit = 1) then
  40.                             begin
  41.                                 FaceIt(nil, GetVal, 1010, 0, 0, 0);
  42.                                 leave;
  43.                             end
  44.                         else if (fRec.wcHit = 2) then
  45.                             begin
  46.                                 FaceIt(nil, GetCtl, 1010, 0, 1, 8);
  47.                                 fRec.uString := 'Run button was hit.';
  48.                                 FaceIt(fRec.cControl, 1565, 2, 0, 0, 0);
  49.                             end;
  50.                 until false;
  51.                 FaceIt(nil, EndWnd, 1010, 0, 0, 0);
  52.             end;
  53.     until false;
  54. end.